<template>
  <el-card shadow="never"
           class="aui-card--fill">
    <el-button type="primary"
               plain
               size="small"
               @click="makingFormDrawer = true">Open Making Form</el-button>
    <generateForm ref="generate-form" />
    <el-drawer title="making Form"
               :visible.sync="makingFormDrawer"
               direction="rtl"
               size="100%"
               style="position:fixed;width:100vw;height:100vh;top:0;left:0;z-index:2013;">
      <makingForm @updateForm='updateGenerateForm' />
    </el-drawer>

  </el-card>
</template>

<script>
import makingForm from './makingForm'
import generateForm from './generateForm'

export default {
  components: { makingForm, generateForm },
  data () {
    return {
      makingFormDrawer: false
    }
  },
  methods: {
    updateGenerateForm () {
      this.makingFormDrawer = false
      this.$refs['generate-form'].getInfo()
    }
  }
}
</script>
